<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!--标准mui.css-->
		<link rel="stylesheet" href="../css/mui.min.css">
		<!--App自定义的css-->
		<!--<link rel="stylesheet" type="text/css" href="../css/app.css"/>-->
	</head>

	<body>

		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">后台管理</h1>
		</header>
		<div class="mui-content">
			<ul class="mui-table-view mui-grid-view mui-grid-9">
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="words">
					<a href="#">
						<span class="mui-icon mui-icon-info"></span>
						<div class="mui-media-body">过滤设置</div>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="feedback">
					<a href="#">
						<span class="mui-icon mui-icon-email"><span class="mui-badge" id="feedbackNum" style="display: none;"></span></span>
						<div class="mui-media-body">查看反馈</div>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="notice">
					<a href="#">
						<span class="mui-icon mui-icon-compose"></span>
						<div class="mui-media-body">公告设置</div>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="reset">
					<a href="#">
						<span class="mui-icon mui-icon-reload"></span>
						<div class="mui-media-body">重置书籍</div>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="share">
					<a href="#">
						<span class="mui-icon mui-icon-compose"></span>
						<div class="mui-media-body">分享设置</div>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="update">
					<a href="#">
						<span class="mui-icon mui-icon-loop"></span>
						<div class="mui-media-body">更新版本</div>
					</a>
				</li>
				
				<!-- <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
					<a href="#">
						<span class="mui-icon mui-icon-search"></span>
						<div class="mui-media-body">Search</div>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
					<a href="#">
						<span class="mui-icon mui-icon-phone"></span>
						<div class="mui-media-body">Phone</div>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
					<a href="#">
						<span class="mui-icon mui-icon-gear"></span>
						<div class="mui-media-body">Setting</div>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
					<a href="#">
						<span class="mui-icon mui-icon-info"></span>
						<div class="mui-media-body">about</div>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
					<a href="#">
						<span class="mui-icon mui-icon-more"></span>
						<div class="mui-media-body">more</div>
					</a>
				</li> -->
			</ul>
		</div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script src="../js/config.js"></script>
	<script>
		mui.init({
			swipeBack: true //启用右滑关闭功能
		});
		
		mui.plusReady(function () {
		    getFeedbackNum();
		})
		
		function getFeedbackNum(){
			mui.ajax(config.config.path + '/feedback/page?page=1&limit=99999&sort=desc&sort_column=create_time', {
					data: {
						"stauts":"0"
					},
					type: "POST",
					contentType: 'application/json;charset=utf-8',
					dataType: "json",
					success: function(result) {
						var code = result.code;
						if (code == 200) {
							if(result.data.records.length > 0){
								document.getElementById("feedbackNum").style.display = "block";
								document.getElementById("feedbackNum").innerHTML = result.data.records.length;
							}
						}
					}
				});
		}
		
		document.getElementById("words").addEventListener('tap',function(){
			mui.openWindow({
				url: "words.html",
				id: "words.html",
				extras: { //自定义扩展参数，可以用来处理页面间传值
					
				},
				createNew: false, //是否重复创建同样id的webview，默认为false:不重复创建，直接显示
				show: {
					autoShow: true //页面loaded事件发生后自动显示，默认为true/页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					autoShow: true, //自动显示等待框，默认为true
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			});
		});
		
		document.getElementById("feedback").addEventListener('tap',function(){
			mui.openWindow({
				url: "feedbackList.html",
				id: "feedbackList.html",
				extras: { //自定义扩展参数，可以用来处理页面间传值
					
				},
				createNew: false, //是否重复创建同样id的webview，默认为false:不重复创建，直接显示
				show: {
					autoShow: true //页面loaded事件发生后自动显示，默认为true/页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					autoShow: true, //自动显示等待框，默认为true
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			});
		});
		
		document.getElementById("notice").addEventListener('tap',function(){
			mui.openWindow({
				url: "notice.html",
				id: "notice.html",
				extras: { //自定义扩展参数，可以用来处理页面间传值
					
				},
				createNew: false, //是否重复创建同样id的webview，默认为false:不重复创建，直接显示
				show: {
					autoShow: true //页面loaded事件发生后自动显示，默认为true/页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					autoShow: true, //自动显示等待框，默认为true
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			});
		});
		
		document.getElementById("reset").addEventListener('tap',function(){
			mui.openWindow({
				url: "resetBook.html",
				id: "resetBook.html",
				extras: { //自定义扩展参数，可以用来处理页面间传值
					
				},
				createNew: false, //是否重复创建同样id的webview，默认为false:不重复创建，直接显示
				show: {
					autoShow: true //页面loaded事件发生后自动显示，默认为true/页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					autoShow: true, //自动显示等待框，默认为true
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			});
		});
		
		document.getElementById("share").addEventListener('tap',function(){
			mui.openWindow({
				url: "share.html",
				id: "share.html",
				extras: { //自定义扩展参数，可以用来处理页面间传值
					
				},
				createNew: false, //是否重复创建同样id的webview，默认为false:不重复创建，直接显示
				show: {
					autoShow: true //页面loaded事件发生后自动显示，默认为true/页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					autoShow: true, //自动显示等待框，默认为true
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			});
		});
		
		document.getElementById("update").addEventListener('tap',function(){
			mui.openWindow({
				url: "update.html",
				id: "update.html",
				extras: { //自定义扩展参数，可以用来处理页面间传值
					
				},
				createNew: false, //是否重复创建同样id的webview，默认为false:不重复创建，直接显示
				show: {
					autoShow: true //页面loaded事件发生后自动显示，默认为true/页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					autoShow: true, //自动显示等待框，默认为true
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			});
		});
	</script>
</html>
